/*    */ package com.controller.front;
/*    */ 
/*    */ import base.dao.BaseExample;
/*    */ import base.dao.BaseExample.Criteria;
/*    */ import base.utils.PageEntity;
/*    */ import base.utils.PagingResult;
/*    */ import base.utils.ResultUtil;
/*    */ import com.service.InviteSpeakerService;
/*    */ import java.io.PrintStream;
/*    */ import java.util.HashMap;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ import org.springframework.web.servlet.ModelAndView;
/*    */ import org.springframework.web.servlet.view.json.MappingJacksonJsonView;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ @Controller
/*    */ @RequestMapping({"invitespeaker"})
/*    */ public class InviteSpeakerController
/*    */ {
/*    */   @Autowired
/*    */   private InviteSpeakerService inviteSpeakerService;
/*    */   
/*    */   @RequestMapping({"getSpeakerList"})
/*    */   public ModelAndView getSpeakerList(HttpServletRequest request)
/*    */   {
/* 38 */     ModelAndView mv = new ModelAndView();
/* 39 */     Map<String, Object> attributes = new HashMap();
/* 40 */     MappingJacksonJsonView view = new MappingJacksonJsonView();
/* 41 */     String page = (request.getParameter("page") == null) || ("".equals(request.getParameter("page"))) ? "1" : request.getParameter("page");
/* 42 */     String size = (request.getParameter("size") == null) || ("".equals(request.getParameter("size"))) ? "20" : request.getParameter("size");
/*    */     try
/*    */     {
/* 45 */       BaseExample ba = new BaseExample();
/* 46 */       ba.or().andEqualTo("deleteFlag", Integer.valueOf(0));
/* 47 */       PageEntity pe = new PageEntity();
/* 48 */       pe.setPage(Integer.valueOf(Integer.parseInt(page)));
/* 49 */       pe.setSize(Integer.valueOf(Integer.parseInt(size)));
/* 50 */       pe.setParams(ba);
/* 51 */       PagingResult pr = this.inviteSpeakerService.selectPagination(pe);
/* 52 */       System.out.println(pr.getResultList());
/* 53 */       List<Map<?, ?>> list = pr.getResultList();
/*    */       
/* 55 */       Map<String, Object> map = new HashMap();
/* 56 */       map.put("list", list);
/* 57 */       map.put("page", page);
/* 58 */       map.put("size", size);
/* 59 */       return ResultUtil.returnJsonStr("0", "ok", attributes, map, view, mv);
/*    */     }
/*    */     catch (Exception e) {
/* 62 */       e.printStackTrace();
/*    */       
/* 64 */       Map<String, Object> map = new HashMap();
/* 65 */       return ResultUtil.returnJsonStr("1", "系统错误", attributes, map, view, mv);
/*    */     }
/*    */   }
/*    */ }


/* Location:              C:\Users\chengkp\Desktop\interwar\WEB-INF\classes\!\com\controller\front\InviteSpeakerController.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */